package top.purity.server.user.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import top.purity.framework.common.result.RespResult;
import top.purity.server.user.controller.vo.UserInfoVO;
import top.purity.server.user.service.AccountService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author Lmh
 * @Description
 * @CreateTime 2023-09-21 19:22
 */

@RestController
@RequestMapping("/account")
@Tag(name = "用户管理")
@RequiredArgsConstructor
public class AccountController {

    @Lazy
    private final AccountService accountService;

    @Operation(summary = "获取用户基本信息", description = "不需要传参数")
    @GetMapping("/getInfo")
    public RespResult getInfo() {
        UserInfoVO userInfoVO = accountService.getInfo();
        return RespResult.ok(userInfoVO);
    }

    @GetMapping("/getPage")
    public RespResult getPage() {
        return RespResult.ok("你好");
    }

}
